home *** CD-ROM | disk | FTP | other *** search
/ Champak 54 / Vol 54.iso / games / wiggi_wa.swf / scripts / DefineSprite_313 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  735 b   |  43 lines

  1. function onRelease()
  2. {
  3.    _alpha = 100;
  4.    if(_parent.ready == true)
  5.    {
  6.       _parent._parent.userAnswer = userAnswer;
  7.       _parent.ready = false;
  8.       _parent._parent.convState = _parent._parent.convState + 1;
  9.    }
  10. }
  11. function onRollOver()
  12. {
  13.    _alpha = 100;
  14. }
  15. function onEnterFrame()
  16. {
  17.    if(scrollTimer == 0)
  18.    {
  19.       this._x -= (_X - xPos) / 5;
  20.       this._y -= (_Y - yPos) / 5;
  21.    }
  22.    else
  23.    {
  24.       scrollTimer--;
  25.    }
  26.    if(_alpha > 50)
  27.    {
  28.       _alpha = _alpha - 5;
  29.    }
  30.    else if(_alpha < 50)
  31.    {
  32.       _alpha = _alpha + 5;
  33.    }
  34. }
  35. stop();
  36. _alpha = 0;
  37. scale = _xscale;
  38. rotateStore = _rotation;
  39. xPos = this._x;
  40. yPos = this._y;
  41. _X = _X + scrollPlaceX;
  42. _Y = _Y + scrollPlaceY;
  43.